﻿<%@ Page Title="World of Art Artist Web Form" Language="C#" MasterPageFile="~/Views/SiteMaster.Master" AutoEventWireup="true" CodeBehind="ArtistWebForm.aspx.cs" Inherits="WorldOfArtWebApp.Views.ArtistWebForm" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
  
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <asp:HyperLink ID="HyperLinkBlog" runat="server"  CssClass="devbloglink"
      NavigateUrl="http://lexicon-software.com/the-artist-web-form/" Target="_blank">Developer&#39;s Blog</asp:HyperLink>

    <div  id="detailsArtist" class="artistdetaildiv">
    <asp:DetailsView ID="DetailsViewArtist" runat="server" Height="50px"  CssClass="artistview"
          Width="347px" AutoGenerateRows="False" DataSourceID="SqlDataSourceArtist" 
          AlternatingRowStyle-CssClass="altrowstyle" PagerStyle-CssClass="footerstyle" 
          CellPadding="4" RowStyle-CssClass="rowstyleartistviews"
         PagerStyle-ForeColor="#f9f9f9" AllowPaging="True">
          <AlternatingRowStyle CssClass="altrowstyle"></AlternatingRowStyle>
        <Fields>
            <asp:BoundField DataField="FirstName" HeaderText="First Name" SortExpression="Name" />
            <asp:BoundField DataField="LastName" HeaderText="Last Name" SortExpression="Name" />

           <asp:BoundField DataField="BirthDay" HeaderText="Birthday" 
                SortExpression="BirthDay" DataFormatString="{0:d}" />
            <asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />
            <asp:BoundField DataField="Country" HeaderText="Country" 
                SortExpression="Country" />
            <asp:BoundField DataField="TypeOfArtist" HeaderText="Type Of Artist" 
                SortExpression="TypeOfArtist" />
        </Fields>
         <PagerStyle CssClass="footerstyle" ForeColor="#F9F9F9"></PagerStyle>
         <RowStyle CssClass="rowstyleartistviews"></RowStyle>
    </asp:DetailsView>
   </div>

   <div id="gridArtist" class="artistgriddiv">
    <asp:GridView ID="GridViewArtist" runat="server" AllowPaging="True"  
           CssClass="artistview" AlternatingRowStyle-CssClass="altrowstyle" CellPadding="4"
           RowStyle-CssClass="rowstyleartistviews" HeaderStyle-CssClass="headerstyle" 
           HeaderStyle-ForeColor="#f9f9f9"  AllowSorting="True" 
           DataSourceID="SqlDataSourceArtist" AutoGenerateColumns="False">
        <AlternatingRowStyle CssClass="altrowstyle"></AlternatingRowStyle>

        <Columns>
            <asp:BoundField DataField="FirstName" HeaderText="First Name" 
                SortExpression="FirstName" />
            <asp:BoundField DataField="LastName" HeaderText="Last Name" 
                SortExpression="LastName" />
            <asp:BoundField DataField="BirthDay" DataFormatString="{0:d}" 
                HeaderText="Date of Birth" SortExpression="BirthDay" />
            <asp:BoundField DataField="City" HeaderText="City" SortExpression="City" />
            <asp:BoundField DataField="Country" HeaderText="Country" 
                SortExpression="Country" />
        </Columns>

        <HeaderStyle CssClass="headerstyle" ForeColor="AntiqueWhite"></HeaderStyle>

        <RowStyle CssClass="rowstyleartistviews"></RowStyle>
    </asp:GridView>
 </div>



<asp:SqlDataSource ID="SqlDataSourceArtist" runat="server" 
    ConnectionString="<%$ ConnectionStrings:DB_38836_aspnetdbConnectionString %>" 
    SelectCommand="SELECT FirstName, LastName, BirthDay, City, Country, TypeOfArtist FROM aspnet_Artist">
</asp:SqlDataSource>

</asp:Content>
